package com.hspedu.enum_;

/**
 * @author sp
 * @version 0.1
 */
public class Enumeration01 {
    //使用
    Season spring = new Season("春天", "温暖");
    Season summer = new Season("夏天", "炎热");
    Season autumn = new Season("秋天", "凉爽");
    Season winter = new Season("冬天", "寒冷");

    //对于季节而言，其对象是固定的4个，不会有更多
    //这样的设计思路，不能体现季节是固定的四个
    //Season other = new Season("红天", "热死");

}


//要求创建季节(Season)对象，请设计并完成
class Season {
    private String name ;
    private String desc;//描述

    public Season(String name, String desc) {
        this.name = name;
        this.desc = desc;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDesc() {
        return desc;
    }

    public void setDesc(String desc) {
        this.desc = desc;
    }
}